let myLabel = UILabel() // Set leading and trailing constraints, and either top/bottom constraint, // likely done within Storyboard myLabel.numberOfLines = 0 myLabel.sizeToFit()